package logo.lang;

/**
 * This is a concrete class to represent the command IF.  An IF
 * statement has three sub expressions: the predicate, the consequent
 * and the alternative.  So, we inherit from an ASTNode3 class.  This
 * class provides an example of how you would implement all of your
 * intermediate classes.
 */
public class IRExpConst extends IRExp {

	LogoVal val;
	
    public IRExpConst(int i) {
    	val = new LogoNum.Int(i);
    }
    
    public IRExpConst(double i) {
    	this.val = new LogoNum.Double(i);
    }
	
    public LogoVal getValue() {
		return val;
	}

	public Object visit(Visitor v, Object info) throws LogoException {
	return v.visitConst(this, info);
    }
}
